
<!-- 添加用户弹窗 -->
<template>
<el-dialog
  title="添加用户"
  :visible.sync="visible"
  width="30%">
  <span>这是一段信息</span>
  <span slot="footer" class="dialog-footer">
    <el-button @click="visible = false">取 消</el-button>
    <el-button type="primary" @click="submit()">确 定</el-button>
  </span>
</el-dialog>
</template>

<script>
  export default {
    data() {
      return {
        visible: false
      };
    },
    methods: {
      open () {
        this.visible = true;
      },
      submit () {
        console.log('提交数据');
      }
    }
  };
</script>